package com.ygxsk.carhome.response;

import android.os.Parcel;
import android.os.Parcelable;

import java.math.BigDecimal;
import java.util.ArrayList;

/*
 * @Author:itchenqi175@163.com
 * @Time:2023-09-09  17:20
 * @Description:关于预约钣喷的外侧实体内容
 */
public class BookingOutsideBean implements Parcelable {

    //价格内容
    private BigDecimal price;

    //预约的外侧的id;
    private String spraySiteId;

    //这个标题的名称
    private String siteNo;

    //是预约房间的内部列表内容
    private ArrayList<BookingInsideBean> siteTimeSpans = new ArrayList<>();


    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public String getSpraySiteId() {
        return spraySiteId;
    }

    public void setSpraySiteId(String spraySiteId) {
        this.spraySiteId = spraySiteId;
    }

    public String getSiteNo() {
        return siteNo;
    }

    public void setSiteNo(String siteNo) {
        this.siteNo = siteNo;
    }

    public ArrayList<BookingInsideBean> getSiteTimeSpans() {
        return siteTimeSpans;
    }

    public void setSiteTimeSpans(ArrayList<BookingInsideBean> siteTimeSpans) {
        this.siteTimeSpans = siteTimeSpans;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeSerializable(this.price);
        dest.writeString(this.spraySiteId);
        dest.writeString(this.siteNo);
        dest.writeList(this.siteTimeSpans);
    }

    public void readFromParcel(Parcel source) {
        this.price = (BigDecimal) source.readSerializable();
        this.spraySiteId = source.readString();
        this.siteNo = source.readString();
        this.siteTimeSpans = new ArrayList<BookingInsideBean>();
        source.readList(this.siteTimeSpans, BookingInsideBean.class.getClassLoader());
    }

    public BookingOutsideBean() {
    }

    protected BookingOutsideBean(Parcel in) {
        this.price = (BigDecimal) in.readSerializable();
        this.spraySiteId = in.readString();
        this.siteNo = in.readString();
        this.siteTimeSpans = new ArrayList<BookingInsideBean>();
        in.readList(this.siteTimeSpans, BookingInsideBean.class.getClassLoader());
    }

    public static final Parcelable.Creator<BookingOutsideBean> CREATOR = new Parcelable.Creator<BookingOutsideBean>() {
        @Override
        public BookingOutsideBean createFromParcel(Parcel source) {
            return new BookingOutsideBean(source);
        }

        @Override
        public BookingOutsideBean[] newArray(int size) {
            return new BookingOutsideBean[size];
        }
    };
}
